package com.fafu.meta.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
    * 用户地址表
    */
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_address")
public class Address {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 收货人姓名
     */
    @TableField(value = "receiver")
    private String receiver;

    /**
     * 县区编号
     */
    @TableField(value = "country_id")
    private Long countryId;

    /**
     * 具体地址
     */
    @TableField(value = "addr")
    private String addr;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private BigDecimal longitude;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private BigDecimal latitude;

    /**
     * 邮编
     */
    @TableField(value = "postcode")
    private String postcode;

    /**
     * 电话
     */
    @TableField(value = "tel")
    private String tel;

    /**
     * 用户编号
     */
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 使用的次数
     */
    @TableField(value = "times")
    private Integer times;

    /**
     * 状态：1可用 2禁用
     */
    @TableField(value = "`state`")
    private Integer state;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
}